home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
051-075
/
scopedisk69
/
cclat
/
src
/
op.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-19
|
1KB
|
31 lines
/*
* file operands
* March 1989, Miles Bader (orig from cc.c by fred fish)
*/
/*
* Command line arguments that represent files to be compiled, assembled,
* or linked, are kept track of as "ops". If, for example,
* the file name is "df0:mydir/junk.c", then the rootname is
* "df0:mydir/junk", the basename is "junk", and the suffix is "c".
* String suffixes are used, rather than single character suffixes, to
* allow use of names with multicharacter suffixes.
*/
struct op{ /* Info about each operand (non option) */
char *rootname; /* Name minus any suffix */
char *basename; /* Name minus any prefix or suffix */
char *suffix; /* suffix of operand */
};
/*
* macros to determine the suffix type of a file given a pointer to
* its operand structure.
*/
#define op_IsC(op) (strcmp(op->suffix,"c")==0)
#define op_IsS(op) (strcmp(op->suffix,"s")==0)
#define op_IsO(op) (strcmp(op->suffix,"o")==0)
struct op *op_Create(char *name);
void op_Free(struct op *op);